A5Storage::SubContainer SetItem Method

Syntax

.SetItem as L (Source as B, ContentType as C, TargetPath as C)

.SetItem as L (Source as C, ContentType as C, TargetPath as C)

.SetItem as L (Source as System::IO::Stream, ContentType as C, TargetPath as C)

Arguments

SourceBinary Character System::IO::Stream

The content to save in the item.

ContentTypeCharacter

The content type.

TargetPathCharacter

The name of the item to store the contents. EG, the name of a file in the Storage container.

Returns

ResultLogical

Returns .T. if the operation succeeds, otherwise .F. (see .CallResult for additional error information.)

Description

Sets the contents of the specified item.

SetItem

Example

dim CallResult as CallResult
dim SubContainer as A5Storage::SubContainer = null_value()

CallResult = A5Storage::SubContainer::Open(SubContainer, "Provider='Disk';Container='c:\A5Webroot';", "logs")
? CallResult.Success
= .T.

? SubContainer.SetItem("<html><body>Hello World</body> </html>", "text/html", "MyPath/ MyItem.html")
= .T.